document.addEventListener('deviceready', () => {
    const config = {
        type: Phaser.AUTO,
        parent: 'game-container',
        width: window.innerWidth,
        height: window.innerHeight,
        scene: {
            preload: preload,
            create: create
        }
    };

    const game = new Phaser.Game(config);

    function preload() {
        // 加载资源示例
        this.load.image('logo', 'assets/logo.png');
    }

    function create() {
        // 创建游戏对象示例
        this.add.image(400, 300, 'logo');
        console.log('游戏场景已初始化');
    }
}, false);